import
request
from '@/uits/request.js'
export default {
	// 默写
	group(data) {
		return request({
			url: "/ocr/common/group",
			method: "post",
			data
		})
	},
	// 登录
	login(data) {
		return request({
			url: `/api/v1/wechat/miniapp/login?code=${data.code}`,
			method: "post",
			data
		})
	}, // 今日任务
	today(data) {
		return request({
			url: `/api/v1/task/pull/today?teacherId=${data.teacherId}`,
			method: "get",
			data
		})
	},
	// 创建任务
	create(data) {
		return request({
			url: `/api/v1/task/create`,
			method: "post",
			data
		})
	},
	// 创建任务作文任务
	createZuowen(data) {
		return request({
			url: '/api/v1/task/create/composition',
			method: 'post',
			data
		})
	},
	// 创建听写任务
	createTingxie(data) {
		return request({
			url: '/api/v1/task/create/dictation',
			method: 'post',
			data
		})
	},
	// 创建默写任务
	createMoxie(data) {
		return request({
			url: '/api/v1/task/create/dictate',
			method: 'post',
			data
		})
	},
	// 获取班级列表
	classList(data) {
		return request({
			url: `/api/v1/classes/teacher/list?teacherId=${data.teacherId}`,
			method: "get",
			data
		})
	},
	// 班级学生列表
	classStudentList(data) {
		return request({
			url: `/api/v1/classes/student/list?classId=${data.classId}&studentName=${data.studentName}`,
			method: "get",
			data
		})
	},
	// 添加学生
	joinStudent(data) {
		return request({
			url: `/api/v1/classes/student/join`,
			method: "post",
			data
		})
	},
	// 删除学生
	quitStudent(data) {
		return request({
			url: `/api/v1/classes/student/quit?classId=${data.classId}&studentId=${data.studentId}`,
			method: "post",
			data
		})
	},
	// 查询学生信息
	studentInfo(data) {
		return request({
			url: `/api/v1/classes/student/info?studentId=${data.studentId}`,
			method: "get",
			data
		})
	},
	// 学校班级信息
	schoolClassList(data) {
		return request({
			url: `/api/v1/classes/school/list?schoolId=${data.schoolId}`,
			method: "get",
			data
		})
	},
	// 添加班级到老师名下
	addClassTeacher(data) {
		return request({
			url: `/api/v1/classes/teacher/add?teacherId=${data.teacherId}&classId=${data.classId}`,
			method: "post",
			data
		})
	},
	// 删除班级
	deleteClassTeacher(data) {
		return request({
			url: `/api/v1/classes/teacher/delete?teacherId=${data.teacherId}&classId=${data.classId}`,
			method: "post",
			data
		})
	}, // 上传
	upLoads(data) {
		return request({
			url: `/api/v1/correct/scan/upload`,
			method: "post",
			data
		})
	},
	// 注册
	zhuCe(data) {
		return request({
			url: `/api/v1/wechat/miniapp/register`,
			method: "post",
			data
		})
	},
	// OCR识别
	OCRrecognition(data) {
		return request({
			url: `/api/v1/task/ocr`,
			method: "post",
			data,
			isUpload: true // 标记为上传请求
		})
	},
	// 审阅列表
	resultList(data) {
		return request({
			url: `/api/v1/correct/result/query?taskId=${data.taskId}`,
			method: "get",
			data,
		})
	},
	// 获取图片在线地址
	imageUrl(data) {
		return request({
			url: `/api/v1/correct/image/url?image=${data.image}`,
			method: "post",
			data,
		})
	},
	// 单个审阅
	resultReview(data) {
		return request({
			url: `/api/v1/correct/result/review`,
			method: "post",
			data,
		})
	},
	// 批量审阅
	batchReview(data) {
		return request({
			url: `/api/v1/correct/result/batchReview`,
			method: "post",
			data,
		})
	}, // 报告列表
	reportList(data) {
		return request({
			url: `/api/v1/report/list?teacherId=${data.teacherId}&taskType=${data.taskType}&timeStatus=${data.timeStatus}`,
			method: "get",
			data,
		})
	},
	// 听写默写报告
	reportDetail(data) {
		return request({
			url: `/api/v1/report/dictation/report/detail?taskId=${data.taskId}`,
			method: "get",
			data,
		})
	},
	// 作文报告报告
	compositionReport(data) {
		return request({
			url: `/api/v1/report/composition/report/detail?taskId=${data.taskId}`,
			method: "get",
			data,
		})
	},
	// 作文批改单个审阅接口
	resultReviewcCmposition(data) {
		return request({
			url: `/api/v1/correct/composition/result/review`,
			method: "post",
			data,
		})
	},
	// 作文批改批量审阅接口
	resultBatchReviewcCmposition(data) {
		return request({
			url: `/api/v1/correct/composition/result/batchReview`,
			method: "post",
			data,
		})
	},
	// 资源库查找
	articleSearch(data) {
		return request({
			url: `/api/v1/article/search?keyword=${data.keyword}`,
			method: "post",
			data,
		})
	},
	// 注册
	miniappRegister(data) {
		return request({
			url: `/api/v1/wechat/miniapp/register`,
			method: "post",
			data,
		})
	},
	// 教师批量添加班级
	batchAdd(data) {
		return request({
			url: `/api/v1/classes/teacher/batch/add`,
			method: "post",
			data,
		})
	},
	// 登录
	loginPhone(data) {
		return request({
			url: `/api/v1/wechat/scanner/login`,
			method: "post",
			data,
		})
	},
	// 获取用户信息
	wechatInfo(data) {
		return request({
			url: `/api/v1/wechat/query/info?teacherId=${data.teacherId}&schoolId=${data.schoolId}`,
			method: "post",
		})
	},

}